package br.com.devschool.service;

import java.util.List;

import br.com.devschool.entity.Disciplina;
import br.com.devschool.persistence.DisciplinaDAO;
import br.com.devschool.util.BaseService;
import br.com.devschool.util.GenericDAO;

/**
 * @author ATILLA
 * 
 */
public class DisciplinaService extends BaseService implements
		GenericDAO<Disciplina> {

	private DisciplinaDAO objDao;

	@Override
	public boolean save(Disciplina object) throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.save(object);
	}

	@Override
	public boolean update(Disciplina object) throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.update(object);
	}

	@Override
	public boolean merge(Disciplina object) throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.merge(object);
	}

	@Override
	public boolean delete(Disciplina object) throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.delete(object);
	}

	@Override
	public Disciplina findById(int pkey) throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.findById(pkey);
	}

	@Override
	public List<Disciplina> findAll() throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.findAll();
	}

	@Override
	public int nextvalById() throws Exception {
		objDao = new DisciplinaDAO();
		return objDao.nextvalById();
	}
}